function [error] = logErr(predictions, labels)
%LOGERR Compute the logistic error of a set of predictions
%
%
% INPUT
%	predictions			- set of predictions from MLP (Np)
%	labels				- corresponding labels
% OUTPUT
%	error				- logistic error
%
% USAGE
%	[error] = logErr(predictions, labels)

a = -labels.*predictions;
nega = a(find(a<0));
posa = a(find(a>=0));
error = mean([log1p(exp(nega)) (posa + log1p(exp(-posa)))]);

end

